package com.anxin.createproinst.service;

import com.anxin.act.process.vo.RuProcessVo;
import com.anxin.createproinst.*;
import org.springframework.stereotype.Service;

@Service
public class OsbService {

//    public String createAct(RuProcessVo ruProcessVo){
//        try {
//            ruProcessVo.setIsUrgent("false");
//            // 设置服务请求对象
//            InputParameters request = new InputParameters();
//            MSGHEADER msgHeader = OSB_BP_WFP_HQ_ImportCreateProInstSrvClient.buildMSGHEADER();
//            INPUTCOLLECTION inputcollection = OSB_BP_WFP_HQ_ImportCreateProInstSrvClient.buildINPUTCOLLECTION(ruProcessVo);
//            request.setMSGHEADER(msgHeader);
//            request.setINPUTCOLLECTION(inputcollection);
//            // 设置服务客户端对象
//            OSBBPWFPHQImportCreateProInstSrv port = OSB_BP_WFP_HQ_ImportCreateProInstSrvClient.buildServiceClient();
//            // 调用服务接口
//            OutputParameters response = port.process(request);
//            // 输出服务调用结果
//            System.out.println("输出服务调用结果+++++++++++++++++++++++++++++++");
//            System.out.println(response.getBIZSERVICEFLAG());
//            System.out.println(response.getBIZRETURNMESSAGE());
//            System.out.println(response.getESBFLAG());
//            System.out.println(response.getESBRETURNMESSAGE());
//            System.out.println("输出服务调用结果结束+++++++++++++++++++++++++++++++");
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//        return null;
//    }
//    public String startAct(RuProcessVo ruProcessVo){
//        try {
//            ruProcessVo.setIsUrgent("true");
//            // 设置服务请求对象
//            InputParameters request = new InputParameters();
//            MSGHEADER msgHeader = OSB_BP_WFP_HQ_ImportCreateProInstSrvClient.buildMSGHEADER();
//            INPUTCOLLECTION inputcollection = OSB_BP_WFP_HQ_ImportCreateProInstSrvClient.buildINPUTCOLLECTION(ruProcessVo);
//            request.setMSGHEADER(msgHeader);
//            request.setINPUTCOLLECTION(inputcollection);
//            // 设置服务客户端对象
//            OSBBPWFPHQImportCreateProInstSrv port = OSB_BP_WFP_HQ_ImportCreateProInstSrvClient.buildServiceClient();
//            // 调用服务接口
//            OutputParameters response = port.process(request);
//            // 输出服务调用结果
//            System.out.println("输出服务调用结果+++++++++++++++++++++++++++++++");
//            System.out.println(response.getBIZSERVICEFLAG());
//            System.out.println(response.getBIZRETURNMESSAGE());
//            System.out.println(response.getESBFLAG());
//            System.out.println(response.getESBRETURNMESSAGE());
//            System.out.println("输出服务调用结果结束+++++++++++++++++++++++++++++++");
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//        return null;
//    }
}
